1. Field of the Invention
The present invention relates to a method, system and program for responding to an acknowledgment request from a printer driver to improve printer performance.
2. Description of the Related Art
To print an image, a print engine processor, referred to herein as a rasterizer, converts or rasterizes the image in a page description language or vector graphics format to a printer readable bit mapped image indicating a value to print at each pixel of the image. An application program on a host computer generates a data stream and instantiates a printer driver to transmit the data stream to the printer. The printer then rasterizes and prints the data stream. International Business Machines Corporation (IBM) provides the Intelligent Printer Data Stream (IPDS) printer service that converts a data stream to an IPDS compatible format. This IPDS data stream is then sent to the printer to rasterize and output. The IPDS architecture provides specific commands and status requests. The printer driver may use the IPDS commands to control how the printer rasterizes and prints the data stream as well as monitor printer operations. The IPDS data stream may include different data types, such as text, image, graphics, and bar code.
The IPDS architecture provides an extensive acknowledgment protocol at the data-stream level. This acknowledgment protocol helps synchronize host and printer processes, exchange query-reply information, and return detailed exception information. Details of the IPDS architecture and acknowledgment protocol are described in the IBM publication “Intelligent Printer Data Stream Reference”, IBM document no. S544-341705 (Copyright IBM, 6th ed., 1996), which publication is incorporated herein by reference in its entirety.
In prior art IPDS implementations, the printer driver requests acknowledgment (ARQ) from the printer. To return acknowledgment, the printer must complete a syntax check of the received page and return an acknowledgment reply (ACK) in order to receive the next page from the printer driver on the host computer. If the printer receives a command requesting acknowledgment (ARQ), and if this command also requests specific printer information, then the printer sends an ACK that contains page and copy counters and the requested information in the data-field portion of the ACK. The page and copy counters may include a received page counter indicating the number of pages the printer has received from the printer driver and a stacked page counter indicating the number of pages successfully stacked, i.e., printed. Other counters may also be used to track the movement of pages and copies of pages through the printer for queue management and exception recovery. If the printer generates the acknowledge reply (ACK) as a result of detecting an exception, the printer sends a negative acknowledgment (NACK). This exception information is stored in a special data area of the NACK. Page and copy counters are also returned in the data-field portion of the NACK.
One dilema with the current acknowledgment reply protocol is that the printer driver will not provide further pages until receiving a positive acknowledgement reply (ACK). In this way, the printer driver ensures that that all paths of execution are synchronized at the point of last command sent as of the acknowledgment request (ARQ). This means that the printer upon receiving an acknowledgment request (ARQ) is idle between the time that it completes rasterizing a page and receives the next page from the printer driver. Further, the printer cannot rasterize pages in parallel because the printer driver does not provide an additional page for the parallel operation until the acknowledgment reply (ACK) is received.
In the prior art, to avoid idle time, an ACK-INTERVAL is used to instruct the printer driver of how many pages to wait before submitting a next acknowledgment request (ARQ). The ACK-INTERVAL value is specified in terms of pages, e.g., 100, 200, 300, etc. A longer ACK-INTERVAL reduces the idle time because relatively more pages are fed to the printer before the next acknowledgment request. Thus, pages are buffered in the printer waiting to be rasterized. However, because status information is provided less frequently with the longer ACK-INTERVAL, the printer driver must buffer more sent pages because the status information provided in the acknowledgment reply (ACK) is used to determine which previously sent pages no longer need to be buffered. Once a page is successfully printed, the printer driver no longer needs to buffer the data. On the other hand, a smaller ACK-INTERVAL provides more frequent status information thereby allowing the printer driver to remove buffered pages more frequently, which reduces the size of the buffer needed by the printer driver. However, a smaller ACK-INTERVAL increases the frequency of the acknowledgment requests, thereby increasing communication and increasing the number of idle periods at the printer.
Thus, there is a need in the art for an improved acknowledgment protocol between a printer driver and printer that reduces idle time at the printer and at the same time minimizes the number of pages the printer driver must buffer between acknowledgment replies (ACK).